package com.taobao.machinesystem.mapper;

import com.taobao.machinesystem.entity.SysPermission;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 * 权限 Mapper 接口
 * </p>
 *
 * @author LiuJunCheng
 * @since 2022-04-22
 */
@Mapper
public interface SysPermissionMapper extends BaseMapper<SysPermission> {

    List<SysPermission> selectPermissionMenuList(String id);

    /**
     * 根据角色id查询出权限
     * @param id
     * @return
     */
    List<SysPermission> selectRolePermission(String id);

    List<String> findByAuthorizations(String id);

    /**
     * 根据权限的pid查询出父权限
     * @param pids
     * @return
     */
    SysPermission selectByPid(String pids);

}
